<script setup lang="ts">
import type { ButtonSize } from 'vant';


type Props = {
    loading?:boolean
    size?:ButtonSize
    flag:0|1
}

withDefaults(defineProps<Props>(),
{
loading:false,
size:'small',
flag:0
}
)
</script>

<template>
     <van-button 
        class="btn" 
        :loading="loading"
        :class="{'is-like':flag}" 
        :size="size"
        round >{{!!flag ?'已关注':'+ 关注'}}</van-button>
</template>

<style lang="scss" scoped>
.btn {
            padding: 0 12px;
            border-color: var(--cp-primary);
            color: var(--cp-primary);
            height: 28px;
            width: 72px;

            &.is-like{
                background: var(--cp-primary);
                color: var(--cp-plain);
            }
        }
</style>